<?php
	session_start();
?>
<!DOCTYPE html>
<html>
<head>
	<title>用户注册</title>
	<style type="text/css">
		*{
			margin: 0;
			padding: 0;
		}
		body{
			background-image: url('img/back.jpg');
			background-size: 100% 100%;
		}
		.register_all{
			width: 500px;
			margin: 100px auto;
			border:3px solid #222222;
			border-radius: 6px;
			box-shadow: 15px 15px 5px lightgrey;
		}
		.blue{
			height: 30px;
			line-height: 30px;
			background-color: #222222;
		}
		.register_top{
			color: white;
			font-size: 16px;
			font-weight: bolder;
		}
		.register{
			width: 460px;
			margin:20px 20px 20px 25px;
			font-size: 15px;
		}
		.register a{
			text-decoration: none;
			color: black;
			font-size: 12px;
		}
		.register a:hover{
			color: red;
			text-decoration: underline;
		}
		.register img{
			vertical-align: bottom;
			border: 1px solid grey;
			border-radius: 5px;
		}
		.register button{
			width: 250px;
			height: 30px;
			margin-left: 105px;
			margin-top: 20px;
			border-radius: 5px;
			background-color: #222222;
			color: #fff;
		}
	</style>
</head>
<body>

<div><a href="login.php">用户登录</a></div>
<div><a href="../article/index.php">路过而已</a></div>
<div class="register_all">
	<div class="blue"><a class="register_top">　　用户注册</a></div>
	<div class="register">
		<form action="registerform.php" method="post">
			<label>用 户 名：<input type="text" name="user" value="<?php if(isset($_SESSION['user'])){echo $_SESSION['user'];}?>">（必须包含大小写字母和数字）</label>
			<?php if(isset($_SESSION['code'])&&($_SESSION['code']=='001'||$_SESSION['code']=='002'||$_SESSION['code']=='010')&&isset($_SESSION['error'])){echo $_SESSION['error'];}?><br><br>
			<label>密　　码：<input type="password" name="pass1" value="<?php if(isset($_SESSION['pass1'])){echo $_SESSION['pass1'];}?>">（字符或数字必须在6至20位之间）</label>
			<?php if(isset($_SESSION['code'])&&($_SESSION['code']=='003'||$_SESSION['code']=='00311')&&isset($_SESSION['error'])){echo $_SESSION['error'];}?><br><br>
			<label>确认密码：<input type="password" name="pass2" value="<?php if(isset($_SESSION['pass2'])){echo $_SESSION['pass2'];}?>"></label>
			<?php if(isset($_SESSION['code'])&&($_SESSION['code']=='004'||$_SESSION['code']=='005')&&isset($_SESSION['error'])){echo $_SESSION['error'];}?><br><br>
			<label>手机号码：<input type="text" name="phone" value="<?php if(isset($_SESSION['phone'])){echo $_SESSION['phone'];}?>"></label>
			<?php if(isset($_SESSION['code'])&&($_SESSION['code']=='006'||$_SESSION['code']=='007')&&isset($_SESSION['error'])){echo $_SESSION['error'];}?><br><br>
			<label>邮　　箱：<input type="email" name="email" value="<?php if(isset($_SESSION['email'])){echo $_SESSION['email'];}?>"></label>
			<?php if(isset($_SESSION['code'])&&($_SESSION['code']=='008'||$_SESSION['code']=='009')&&isset($_SESSION['error'])){echo $_SESSION['error'];}?><br><br>
			<label>
				验 证 码：<input type="text" name="cap">
			</label>
			<a href="register.php" class=""><img src="captach.php">&nbsp;点击刷新</a><br>
			<?php if(isset($_SESSION['code'])&&$_SESSION['code']=='111'&&isset($_SESSION['error'])){echo $_SESSION['error'];}?><br>
			<div><?php if(isset($_SESSION['code'])&&$_SESSION['code']=='011'&&isset($_SESSION['error'])){echo $_SESSION['error'];}?></div>
			<button>　注　册　账　号　</button>
		</form>
	</div>
</div>
</body>
</html>